<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>新增-教学信息管理系统</title>
	<meta name="keywords" content="教学信息管理系统">
	<meta name="description" content="教学信息管理系统">
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<link rel="stylesheet" href="../../layui/css/layui.css" media="all">
	<style>
		.popIframeBody {background: rgb(247,247,247);}
		.popIframeContent {padding:20px;background: rgb(255,255,255);}
		.popIframeBtn {padding:20px 0px;border-top:1px rgb(235,235,235) solid;text-align: center;}
	</style>
</head>
<body class="popIframeBody">
<form class="layui-form" lay-filter="editFilter">
	<div class="popIframeContent">

		<div class="layui-form-item">
			<div class="layui-form-label">性别</div>
			<div class="layui-input-block">
				<select name="gender" lay-verify="required">
					<option value="">请选择</option>
					<option value="F">男</option>
					<option value="F">女</option>
				</select>
			</div>
		</div>

		<div class="layui-form-item">
			<div class="layui-form-label">国籍</div>
			<div class="layui-input-block">
				<input type="text" name="NationalITy" required lay-verify="required" placeholder="请输入国籍" autocomplete="off" class="layui-input">
			</div>
		</div>

		<div class="layui-form-item">
			<div class="layui-form-label">出生地</div>
			<div class="layui-input-block">
				<input type="text" name="PlaceofBirth" required lay-verify="required" placeholder="请输入出生地" autocomplete="off" class="layui-input">
			</div>
		</div>

		<div class="layui-form-item">
			<div class="layui-form-label">教育阶段</div>
			<div class="layui-input-block">
				<select name="StageID" lay-verify="required">
					<option value="">请选择</option>
					<option value="lowerlevel">低年级</option>
					<option value="MiddleSchool">中学</option>
					<option value="HighSchool">高中</option>
				</select>
			</div>
		</div>

		<div class="layui-form-item">
			<div class="layui-form-label">年级</div>
			<div class="layui-input-block">
				<select name="GradeID" lay-verify="required">
					<option value="">请选择</option>
					<option value="G-01">一年级</option>
					<option value="G-02">二年级</option>
					<option value="G-03">三年级</option>
					<option value="G-04">四年级</option>
					<option value="G-05">五年级</option>
					<option value="G-06">六年级</option>
					<option value="G-07">七年级</option>
					<option value="G-08">八年级</option>
					<option value="G-09">九年级</option>
					<option value="G-10">十年级</option>
					<option value="G-11">十一年级</option>
					<option value="G-12">十二年级</option>
				</select>
			</div>
		</div>

		<div class="layui-form-item">
			<div class="layui-form-label">班级</div>
			<div class="layui-input-block">
				<select name="SectionID" lay-verify="required">
					<option value="">请选择</option>
					<option value="A">A班</option>
					<option value="B">B班</option>
					<option value="C">C班</option>
				</select>
			</div>
		</div>

		<div class="layui-form-item">
			<div class="layui-form-label">学科</div>
			<div class="layui-input-block">
				<select name="Topic" lay-verify="required">
					<option value="">请选择</option>
					<option value="Arabic">阿拉伯语</option>
					<option value="Biology">生物</option>
					<option value="Chemistry">化学</option>
					<option value="English">英语</option>
					<option value="French">法语</option>
					<option value="History">历史</option>
					<option value="IT">信息技术</option>
					<option value="Math">数学</option>
					<option value="Quran">古兰经</option>
					<option value="Science">科学</option>
					<option value="Spanish">西班牙语</option>
				</select>
			</div>
		</div>

		<div class="layui-form-item">
			<div class="layui-form-label">学期</div>
			<div class="layui-input-block">
				<select name="Semester" lay-verify="required">
					<option value="">请选择</option>
					<option value="F">第一学期</option>
					<option value="S">第二学期</option>
				</select>
			</div>
		</div>

		<div class="layui-form-item">
			<div class="layui-form-label">主要联系人</div>
			<div class="layui-input-block">
				<select name="Relation" lay-verify="required">
					<option value="">请选择</option>
					<option value="Father">父亲</option>
					<option value="Mum">母亲</option>
					<option value="Teacher">教师</option>
				</select>
			</div>
		</div>

		<div class="layui-form-item">
			<div class="layui-form-label">举手次数</div>
			<div class="layui-input-block">
				<input type="number" name="raisedhands" min="0" required lay-verify="required|number" placeholder="请输入举手次数" autocomplete="off" class="layui-input">
			</div>
		</div>

		<div class="layui-form-item">
			<div class="layui-form-label">访问资源次数</div>
			<div class="layui-input-block">
				<input type="number" name="VisITedResources" min="0" required lay-verify="required|number" placeholder="请输入访问资源次数" autocomplete="off" class="layui-input">
			</div>
		</div>

		<div class="layui-form-item">
			<div class="layui-form-label">查看公告次数</div>
			<div class="layui-input-block">
				<input type="number" name="AnnouncementsView" min="0" required lay-verify="required|number" placeholder="请输入查看公告次数" autocomplete="off" class="layui-input">
			</div>
		</div>

		<div class="layui-form-item">
			<div class="layui-form-label">参与讨论次数</div>
			<div class="layui-input-block">
				<input type="number" name="Discussion" min="0" required lay-verify="required|number" placeholder="请输入参与讨论次数" autocomplete="off" class="layui-input">
			</div>
		</div>

		<div class="layui-form-item">
			<div class="layui-form-label">家长是否参与调查</div>
			<div class="layui-input-block">
				<select name="ParentAnsweringSurvey" lay-verify="required">
					<option value="">请选择</option>
					<option value="Yes">是</option>
					<option value="No">否</option>
				</select>
			</div>
		</div>

		<div class="layui-form-item">
			<div class="layui-form-label">家长对学校满意度</div>
			<div class="layui-input-block">
				<select name="ParentschoolSatisfaction" lay-verify="required">
					<option value="">请选择</option>
					<option value="Good">满意</option>
					<option value="Bad">不满意</option>
				</select>
			</div>
		</div>

		<div class="layui-form-item">
			<div class="layui-form-label">学生缺勤情况</div>
			<div class="layui-input-block">
				<select name="StudentAbsenceDays" lay-verify="required">
					<option value="">请选择</option>
					<option value="Under-7">少于7天</option>
					<option value="Above-7">多于7天</option>
				</select>
			</div>
		</div>

		<div class="layui-form-item">
			<div class="layui-form-label">成绩等级</div>
			<div class="layui-input-block">
				<select name="Class" lay-verify="required">
					<option value="">请选择</option>
					<option value="H">高(80-100)</option>
					<option value="M">中(50-79)</option>
					<option value="L">低(0-49)</option>
				</select>
			</div>
		</div>

	</div>
	<div class="popIframeBtn">
		<button class="layui-btn" lay-submit lay-filter="submit">保存</button>
		<button type="reset" class="layui-btn layui-btn-primary">重置</button>
	</div>
</form>
</body>
<script src="../../layui/layui.js" charset="utf-8"></script>
<script src="../../js/public.js" charset="utf-8"></script>
<script>
	layui.use(['form','laydate'], function(){
		var form = layui.form;
		var $ = layui.jquery;
		var id = getQueryString("id");
		var laydate = layui.laydate;

		// 初始化日期选择器（如果需要）
		laydate.render({
			elem: '#start_time'
			,type: 'date'
			,trigger: 'click'
			,format: 'yyyy年MM月dd日'
		});

		laydate.render({
			elem: '#end_time'
			,type: 'date'
			,trigger: 'click'
			,format: 'yyyy年MM月dd日'
		});

		// 获取数据并填充表单
		getData('/teaching/queryDetail',{"id":id},'get',function render(data){
			form.val('editFilter',  data);
			form.render();
		});

		// 监听提交
		form.on('submit(submit)',function(data){
			data.field.id = id; // 添加ID到表单数据
			SubmitTable('/teaching/update',data.field,'post',true,'tableList');
			return false;
		});
	});
</script>
</html>